//
//  ByCoreCacheModel.m
//  beibei_ios
//
//  Created by pro on 16/5/7.
//  Copyright © 2016年 hebidu. All rights reserved.
//

#import "ByCoreCacheModel.h"
#import "FastCoder.h"
@implementation ByCoreCacheModel

- (instancetype)init {
    
    if (self = [super init]) {
        // 设置默认数据
        __id = 0;
        _key = @"";
        _value = nil;
        _type = nil;
        _update_time = 0;
        _expire_time = 0;
    }
    
    return self;
}

- (NSString *)description {
    
    
//    id value = nil;
//    if ([[FastCoder objectWithData:self.value] respondsToSelector:@selector(copy)]) {
//        value = [[FastCoder objectWithData:self.value] copy];
//    }
    
    NSDictionary *info = @{@"id":@(self._id),
                           @"key":self.key,
//                           @"value":value,
                           @"type":self.type,
                           @"cache_time":@(self.update_time),
                           @"expire_time":@(self.expire_time)};
    return [NSString stringWithFormat:@"<%@, %@>", [self class], info];
    
}
@end
